docs: compose logs: add links for since/until flag descriptions#13806
docs: compose logs: add links for since/until flag descriptions#13806thaJeztah wants to merge 1 commit into
Conversation
| flags.BoolVarP(&opts.follow, "follow", "f", false, "Follow log output") | ||
| flags.IntVar(&opts.index, "index", 0, "index of the container if service has multiple replicas") | ||
| flags.StringVar(&opts.since, "since", "", "Show logs since timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)") | ||
| flags.SetAnnotation("since", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/container/logs/"}) |
There was a problem hiding this comment.
no anchor for this one yet
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
This is a clean, minimal documentation PR that adds ExternalURL annotations to the --since and --until flags in compose logs. The Go source change, the generated Markdown table (compose_logs.md), and the generated YAML (docker_compose_logs.yaml) are all mutually consistent.
One minor observation (informational, not blocking): --until links directly to the #until anchor (https://docs.docker.com/reference/cli/docker/container/logs/#until), while --since links to the root page without a fragment. The PR description acknowledges that the Docker container logs docs still need per-flag sections, so this asymmetry is intentional and acceptable for now — --since simply doesn't have a dedicated anchor target yet.
No functional issues found in the changed code.
There was a problem hiding this comment.
Pull request overview
Adds cross-references for docker compose logs --since/--until flags to the equivalent docker container logs documentation, so users can find detailed accepted timestamp/relative formats.
Changes:
- Add
details_urlentries forsinceanduntilin the reference YAML. - Add external documentation links for
--sinceand--untilin the generatedcompose_logs.mdoptions table. - Annotate the Cobra flags for
since/untilwith external URLs to drive doc generation.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/reference/docker_compose_logs.yaml | Adds details_url metadata for since/until options to point at container logs docs. |
| docs/reference/compose_logs.md | Updates the options table to link --since/--until to external docs pages. |
| cmd/compose/logs.go | Adds external URL annotations to since/until flags for documentation generation. |
| flags.SetAnnotation("since", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/container/logs/"}) | ||
| flags.StringVar(&opts.until, "until", "", "Show logs before a timestamp (e.g. 2013-01-02T13:23:37Z) or relative (e.g. 42m for 42 minutes)") | ||
| flags.SetAnnotation("until", annotation.ExternalURL, []string{"https://docs.docker.com/reference/cli/docker/container/logs/#until"}) |
There was a problem hiding this comment.
Yeah, added the "nolint"; still need to convince the pflag maintainers / finish my PR there;
|
Opened docker/cli#7003 in the CLI |
Link to the corresponding `docker container logs` equivalents, which contain more details on the accepted formats and use. The container logs documentation still needs some updates to provide per-flag sections, so follow-ups can be made once those are done. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Link to the corresponding
docker container logsequivalents, which contain more details on the accepted formats and use.The container logs documentation still needs some updates to provide per-flag sections, so follow-ups can be made once those are done.
What I did
Related issue
(not mandatory) A picture of a cute animal, if possible in relation to what you did